from utils import find_image,get_hwnd,pick_grass
import time;
import cv2;
import time;
import win32api, win32con, win32gui;
import random;


left, top, right, bottom, hwnd = get_hwnd.getRectangle()
pick = pick_grass.Picker(left, top, right - 336, bottom, hwnd)
cnt = 0;
while  cnt >= 0 :
    try:
        response = pick.pick();
        if response['state'].__eq__("NOT_FIND"):
            pick.around();
    except Exception as e:
        print(e);
        pass
    cnt+=1;
    print("循环", cnt);